package com.ihd.ihardwaretools.pojo;

import android.text.TextUtils;

import java.io.Serializable;
import java.util.List;

import cn.wowjoy.commonlibrary.bean.BaseResponse;

public class ListRes extends BaseResponse<ListRes.DataBean> implements Serializable {


    public static class DataBean implements Serializable {
        /**
         * list : [{"address":"string","id":"string","mac":"string","modifyTime":"string","phoneNumber":"string","type":"string","typeName":"string","vendor":"string"}]
         * pageNum : 0
         * pageSize : 0
         * pages : 0
         * total : 0
         */

        private int pageNum;
        private int pageSize;
        private int pages;
        private String total;
        private List<ListBean> list;

        public int getPageNum() {
            return pageNum;
        }

        public void setPageNum(int pageNum) {
            this.pageNum = pageNum;
        }

        public int getPageSize() {
            return pageSize;
        }

        public void setPageSize(int pageSize) {
            this.pageSize = pageSize;
        }

        public int getPages() {
            return pages;
        }

        public void setPages(int pages) {
            this.pages = pages;
        }

        public String getTotal() {
            return total;
        }

        public void setTotal(String total) {
            this.total = total;
        }

        public List<ListBean> getList() {
            return list;
        }

        public void setList(List<ListBean> list) {
            this.list = list;
        }

        public static class ListBean implements Serializable {
            /**
             * address : string
             * id : string
             * mac : string
             * modifyTime : string
             * phoneNumber : string
             * type : string
             * typeName : string
             * vendor : string
             */

            private String address;
            private String id;
            private String mac;
            private String modifyTime;
            private String phoneNumber;
            private String type;
            private String typeName;
            private String vendor;

            public String getAddress() {
                return address;
            }

            public void setAddress(String address) {
                this.address = address;
            }

            public String getId() {
                return id;
            }

            public void setId(String id) {
                this.id = id;
            }

            public String getMac() {
                if (!TextUtils.isEmpty(mac) && mac.length() == 12) {
                    String temp = mac.toUpperCase();
                    return temp.substring(0, 2) + ":" + temp.substring(2, 4) + ":" + temp.substring(4, 6) + ":" + temp.substring(6, 8) + ":" + temp.substring(8, 10) + ":" + temp.substring(10, 12);
                } else
                    return mac;
            }

            public void setMac(String mac) {
                this.mac = mac;
            }

            public String getModifyTime() {
                return modifyTime;
            }

            public void setModifyTime(String modifyTime) {
                this.modifyTime = modifyTime;
            }

            public String getPhoneNumber() {
                return phoneNumber;
            }

            public void setPhoneNumber(String phoneNumber) {
                this.phoneNumber = phoneNumber;
            }

            public String getType() {
                return type;
            }

            public void setType(String type) {
                this.type = type;
            }

            public String getTypeName() {
                return typeName;
            }

            public void setTypeName(String typeName) {
                this.typeName = typeName;
            }

            public String getVendor() {
                return vendor;
            }

            public void setVendor(String vendor) {
                this.vendor = vendor;
            }
        }
    }
}
